import { INavBarItem } from 'interface/INavBarItem';
import * as React from 'react';
import { NavLink, RouteComponentProps, withRouter } from 'react-router-dom';
export interface INavBarItemProps extends RouteComponentProps {
    item: INavBarItem
}

export interface INavBarItemState {
}

class NavBarItem extends React.Component<INavBarItemProps, INavBarItemState> {
    constructor(props: INavBarItemProps) {
        super(props);

        this.state = {
        }
    }

    public render() {
        return (
            <li className={"nav-item h-100"} >
                <NavLink type={"button"} style={{width:"100px"}} className={"btn btn-primary border-0 h-100 d-flex  flex-column   justify-content-center"} activeClassName={"active"} to={this.props.item.path}>{this.props.item.name}</NavLink>
            </li>
        );
    }
}

export default withRouter(NavBarItem)
